<?php
Zend_Session::start();
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initAutoload(){
            $autoloader = new Zend_Application_Module_Autoloader(array(
                    'namespace'=>'',
                    'basePath'=>dirname(__FILE__),
            ));
            return $autoloader;
    }
    protected function _initDB(){
            $db = Zend_Db::factory('Pdo_Mysql',array(
                    'host'=>'localhost',
                    'username'=>'root',
                    'password'=>'',
                    'dbname'=>'bongdaonline',
                    'charset'=>'utf8'
            ));
            $db->setFetchMode(Zend_Db::FETCH_BOTH);
            Zend_Db_Table::setDefaultAdapter($db);
            return $db;
    }
    public function _initView()
    {
        $view=new Zend_View();
        $view->headMeta()->appendHttpEquiv("Conten-Type","text/html;charset='UTF8'");
        //css
        $view->headLink()->appendStylesheet(HOST_PATH."/public/css/StyleLayout.css");
        $view->headLink()->offsetSetStylesheet("2",HOST_PATH."/public/css/StyleAdmin.css");
        $view->headLink()->offsetSetStylesheet("3",HOST_PATH."/public/css/StyleIndex.css");
        
        //js
        $view->headScript()->appendFile(HOST_PATH."/public/js/jquery_1.5-jquery_ui.min.js");
        $view->headScript()->offsetSetFile("2",HOST_PATH."/public/js/chrome.js");
        //ckeditor
        $view->headScript()->offsetSetFile("3",HOST_PATH."/public/js/ckeditor/ckeditor.js");
    }
}

